#coding=utf-8

import random

from header_common import *
from header_items import *
from header_troops import *
from header_skills import *
from ID_factions import *
from ID_items import *
from ID_scenes import *

####################################################################################################################
#  Each troop contains the following fields:
#  1) Troop id (string): used for referencing troops in other files. The prefix trp_ is automatically added before each troop-id .
#  2) Toop name (string).
#  3) Plural troop name (string).
#  4) Troop flags (int). See header_troops.py for a list of available flags
#  5) Scene (int) (only applicable to heroes) For example: scn_reyvadin_castle|entry(1) puts troop in reyvadin castle's first entry point
#  6) Reserved (int). Put constant "reserved" or 0.
#  7) Faction (int)
#  8) Inventory (list): Must be a list of items
#  9) Attributes (int): Example usage:
#           str_6|agi_6|int_4|cha_5|level(5)
# 10) Weapon proficiencies (int): Example usage:
#           wp_one_handed(55)|wp_two_handed(90)|wp_polearm(36)|wp_archery(80)|wp_crossbow(24)|wp_throwing(45)
#     The function wp(x) will create random weapon proficiencies close to value x.
#     To make an expert archer with other weapon proficiencies close to 60 you can use something like:
#           wp_archery(160) | wp(60)
# 11) Skills (int): See header_skills.py to see a list of skills. Example:
#           knows_ironflesh_3|knows_power_strike_2|knows_athletics_2|knows_riding_2
# 12) Face code (int): You can obtain the face code by pressing ctrl+E in face generator screen
# 13) Face code (int)(2) (only applicable to regular troops, can be omitted for heroes):
#     The game will create random faces between Face code 1 and face code 2 for generated troops
# 
####################################################################################################################

# Some constant and function declarations to be used below...

def wp(x):
  n = 0
  r = 10 + int(x / 10)
  n |= wp_one_handed(x + random.randrange(r))
  n |= wp_two_handed(x + random.randrange(r))
  n |= wp_polearm(x + random.randrange(r))
  n |= wp_archery(x + random.randrange(r))
  n |= wp_crossbow(x + random.randrange(r))
  n |= wp_throwing(x + random.randrange(r))
  n |= wp_firearm(x + random.randrange(r))
  return n

#Skills
knows_common = knows_riding_1|knows_trade_2|knows_inventory_management_2|knows_prisoner_management_1|knows_leadership_1

knows_hero = knows_trainer_10|knows_weapon_master_10|knows_ironflesh_5|knows_riding_5|knows_trade_2|knows_inventory_management_2|knows_prisoner_management_1|knows_leadership_1

#These face codes are generated by the in-game face generator.
#Enable edit mode and press ctrl+E in face generator screen to obtain face codes.

refugee_face1 = 0x000000000000000201c0600048440000
refugee_face2 = 0x00000000000c300401c0600048440000
girl_face1    = 0x00000000000c000101c0600048440000
girl_face2    = 0x00000000000c300401c0600048440000

vaegir_face1  = 0x00000000000001c101d8248040040049
vaegir_face2  = 0x000000000004328701fed769b6fb6dbe
swadian_face1 = 0x000000000000000101c0008040008240
swadian_face2 = 0x00000000000c71c701fcdb69aff77dbf

khergit_face1 = 0x00000000000843c801cc244a98000000
khergit_face2 = 0x00000000000c740901ff524a9e77eb1d
pirate_face1  = 0x00000000000031c301c0000000000000
pirate_face2  = 0x00000000000c824801feb76dffffffff
bandit_face1  = 0x00000000000031c301c0000000000000
bandit_face2  = 0x00000000000c724801feb76dffffffff

undead_face1  = 0x00000000002000000000000000000000
undead_face2  = 0x000000000020010000001fffffffffff

asia_face1 		= 0x00000000000c00000000000000000000
asia_face2 		= 0x00000000000c724801feb76dffffffff


reserved = 0

no_scene = 0




troops = [
  ["player","Player","Player",tf_hero,no_scene,reserved,fac_player_faction,
   [itm_shield_kite_k,itm_military_hammer,itm_yum_dried_meat,itm_yum_dried_meat],
   str_6|agi_6|int_6|cha_6,
   wp_one_handed(55)|wp_two_handed(68)|wp_polearm(36)|wp_archery(68)|wp_crossbow(24)|wp_throwing(45)|wp_firearm(68),
   0,0x000000000000000100036db6db6db6db],
  ["temp_troop","Temp Troop","Temp Troop",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common|knows_inventory_management_10,0],
  ["game","Game","Game",tf_hero,no_scene,reserved,fac_commoners,[],def_attrib,0,knows_common,0],
  ["unarmed_troop","Unarmed Troop","Unarmed Troops",tf_hero,no_scene,reserved,fac_commoners,[itm_arrows,itm_short_bow],def_attrib|str_14,0,knows_common|knows_power_draw_2,0],
####################################################################################################################
# Troops before this point are hardwired into the game and their order should not be changed!
####################################################################################################################
  ["novice_fighter","Novice Fighter","Novice Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,
   [itm_sword,itm_hide_boots],
   str_6|agi_6|level(5),wp(60),knows_common,swadian_face1, swadian_face2],
  ["regular_fighter","Regular Fighter","Regular Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,
   [itm_sword,itm_hide_boots],
   str_8|agi_8|level(11),wp(90),knows_common|knows_ironflesh_1|knows_power_strike_1|knows_athletics_1|knows_riding_1|knows_shield_2,swadian_face1, swadian_face2],
  ["veteran_fighter","Veteran Fighter","Veteran Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,0,fac_commoners,
   [itm_sword,itm_wooden_shield,itm_hide_boots],
   str_10|agi_10|level(17),wp(110),knows_common|knows_ironflesh_3|knows_power_strike_2|knows_athletics_2|knows_riding_2|knows_shield_3,swadian_face1, swadian_face2],
  ["champion_fighter","Champion Fighter","Champion Fighters",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_commoners,
   [itm_sword,itm_hide_boots],
   str_12|agi_11|level(22),wp(140),knows_common|knows_ironflesh_4|knows_power_strike_3|knows_athletics_3|knows_riding_3|knows_shield_4,swadian_face1, swadian_face2],
#soldiers:
  ["farmer","Farmer","Farmers",tf_guarantee_armor,no_scene,reserved,fac_swadians,
   [itm_cleaver,itm_knife,itm_pitch_fork,itm_sickle,itm_club,itm_stones,itm_leather_cap,itm_felt_hat,itm_felt_hat,itm_linen_tunic,itm_coarse_tunic,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(4),wp(60),knows_common,swadian_face1, swadian_face2],
  ["townsman","Townsman","Townsmen",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_swadians,
   [itm_cleaver,itm_knife,itm_club,itm_quarter_staff,itm_dagger,itm_stones,itm_leather_cap,itm_linen_tunic,itm_coarse_tunic,itm_leather_apron,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(4),wp(60),knows_common,swadian_face1, swadian_face2],
  ["watchman","Watchman","Watchmen",tf_guarantee_boots|tf_guarantee_armor,no_scene,reserved,fac_swadians,
   [itm_bolts,itm_spiked_club,itm_fighting_pick,itm_nordic_sword,itm_boar_spear,itm_hunting_crossbow,itm_light_crossbow,itm_nordic_shield,itm_nordic_shield,itm_wooden_shield,itm_padded_cloth,itm_leather_jerkin,itm_leather_cap,itm_padded_coif,itm_skullcap,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(9),wp(75),knows_common|knows_shield_1,swadian_face1, swadian_face2],
  ["caravan_guard","Caravan Guard","Caravan Guards",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,no_scene,0,fac_swadians,
   [itm_spear,itm_fighting_pick,itm_arming_sword,itm_voulge,itm_nordic_shield,itm_wooden_shield,itm_wooden_shield,itm_round_shield,itm_round_shield,itm_leather_jerkin,itm_leather_vest,itm_scale_armor,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_skullcap,itm_saddle_horse],
   def_attrib|level(14),wp(85),knows_common|knows_riding_2|knows_ironflesh_1|knows_shield_3,swadian_face1, swadian_face2],
  ["mercenary","Mercenary","Mercenaries",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,no_scene,reserved,fac_swadians,
   [itm_spear,itm_fighting_pick,itm_bastard_sword,itm_sword,itm_kite_shield,itm_kite_shield,itm_kite_shield_,itm_battle_shield,itm_round_shield,itm_kite_shield_,itm_heraldric_armor,itm_mail_hauberk,itm_scale_armor,itm_hide_boots,itm_kettle_hat,itm_mail_coif,itm_flat_topped_helmet,itm_helmet_with_neckguard,itm_saddle_horse,itm_courser,itm_hunter],
   def_attrib|level(20),wp(100),knows_common|knows_riding_3|knows_ironflesh_2|knows_shield_3,swadian_face1, swadian_face2],
  ["hired_blade","Hired Blade","Hired Blades",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet,no_scene,reserved,fac_swadians,
   [itm_lance,itm_bastard_sword,itm_great_sword,itm_sword,itm_kite_shield_,itm_war_shield,itm_kite_shield,itm_kite_shield,itm_heraldric_shield,itm_heater_shield,itm_coat_of_plates,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_great_helmet,itm_bascinet,itm_hunter,itm_hunter,itm_charger,itm_warhorse, itm_leather_gloves],
   def_attrib|level(25),wp(120),knows_common|knows_riding_5|knows_shield_3|knows_ironflesh_3,swadian_face1, swadian_face2],

#peasant - retainer - footman - man-at-arms -  knight
  ["swadian_peasant","Swadian Peasant","Swadian Peasants",tf_guarantee_armor,0,0,fac_swadians,
   [itm_cleaver,itm_knife,itm_pitch_fork,itm_sickle,itm_club,itm_stones,itm_leather_cap,itm_felt_hat,itm_felt_hat,itm_linen_tunic,itm_coarse_tunic,itm_leather_apron,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(4),wp(60),knows_common,swadian_face1, swadian_face2],
  ["swadian_militia","Swadian Militia","Swadian Militias",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_swadians,
   [itm_bolts,itm_spiked_club,itm_fighting_pick,itm_nordic_sword,itm_boar_spear,itm_hunting_crossbow,itm_nordic_shield,itm_wooden_shield,itm_padded_cloth,itm_leather_jerkin,itm_leather_cap,itm_padded_coif,itm_skullcap,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(9),wp(75),knows_common,swadian_face1, swadian_face2],
  ["swadian_footman","Swadian Footman","Swadian Footmen",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_swadians,
   [itm_spear,itm_fighting_pick,itm_nordic_sword,itm_arming_sword,itm_nordic_shield,itm_wooden_shield,itm_round_shield,itm_round_shield,itm_nordic_shield,itm_leather_jerkin,itm_leather_vest,itm_scale_armor,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_skullcap],
   def_attrib|level(14),wp(85),knows_common|knows_ironflesh_1|knows_shield_2,swadian_face1, swadian_face2],
  ["swadian_infantry","Swadian Infantry","Swadian Infantry",tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_swadians,
   [itm_pike,itm_spear,itm_fighting_pick,itm_bastard_sword,itm_sword,itm_kite_shield,itm_kite_shield,itm_kite_shield_,itm_battle_shield,itm_round_shield,itm_kite_shield_,itm_heraldric_armor,itm_mail_hauberk,itm_scale_armor,itm_hide_boots,itm_kettle_hat,itm_mail_coif,itm_flat_topped_helmet,itm_helmet_with_neckguard],
   def_attrib|level(20),wp(100),knows_common|knows_riding_3|knows_ironflesh_2|knows_shield_3,swadian_face1, swadian_face2],
  ["swadian_sergeant","Swadian Sergeant","Swadian Sergeants",tf_mounted|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_swadians,
   [itm_awlpike,itm_pike,itm_great_sword,itm_morningstar,itm_sword,itm_kite_shield_,itm_war_shield,itm_kite_shield,itm_kite_shield,itm_heraldric_shield,itm_heater_shield,itm_coat_of_plates,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_helmet_with_neckguard,itm_bascinet,itm_guard_helmet,itm_leather_gloves],
   def_attrib|level(25),wp(130),knows_common|knows_shield_3|knows_ironflesh_3|knows_power_strike_3,swadian_face1, swadian_face2],
  ["swadian_skirmisher","Swadian Skirmisher","Swadian Skirmishers",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_swadians,
   [itm_bolts,itm_light_crossbow,itm_hunting_crossbow,itm_dagger,itm_club,itm_voulge,itm_wooden_shield,itm_leather_jerkin,itm_leather_vest,itm_padded_cloth,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_skullcap],
   def_attrib|level(14),wp(80),knows_common|knows_riding_2|knows_ironflesh_1,swadian_face1, swadian_face2],
  ["swadian_crossbowman","Swadian Crossbowman","Swadian Crossbowmen",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_swadians,
   [itm_bolts,itm_crossbow,itm_light_crossbow,itm_fighting_pick,itm_dagger,itm_arming_sword,itm_voulge,itm_nordic_shield,itm_wooden_shield,itm_leather_jerkin,itm_leather_vest,itm_scale_armor,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_skullcap],
   def_attrib|level(14),wp(100),knows_common|knows_riding_2|knows_ironflesh_1,swadian_face1, swadian_face2],
  ["swadian_sharpshooter","Swadian Sharpshooter","Swadian Sharpshooters",tf_guarantee_ranged|tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_swadians,
   [itm_bolts,itm_arrows,itm_crossbow,itm_crossbow,itm_heavy_crossbow,itm_long_bow,itm_arming_sword,itm_voulge,itm_heater_shield,itm_heater_shield,itm_leather_jerkin,itm_padded_leather,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_kettle_hat,itm_kettle_hat,itm_leather_gloves],
   def_attrib|str_14|level(24),wp(130),knows_common|knows_power_draw_3|knows_ironflesh_1,swadian_face1, swadian_face2],
  ["swadian_man_at_arms","Swadian Man at Arms","Swadian Men at Arms",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_swadians,
   [itm_lance,itm_lance,itm_fighting_pick,itm_bastard_sword,itm_sword,itm_kite_shield,itm_kite_shield,itm_kite_shield_,itm_battle_shield,itm_round_shield,itm_kite_shield_,itm_heraldric_armor,itm_mail_hauberk,itm_scale_armor,itm_hide_boots,itm_mail_coif,itm_flat_topped_helmet,itm_helmet_with_neckguard,itm_warhorse,itm_warhorse,itm_hunter],
   def_attrib|level(20),wp(100),knows_common|knows_riding_4|knows_ironflesh_2|knows_shield_2,swadian_face1, swadian_face2],
  ["swadian_knight","Swadian Knight","Swadian Knights",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_swadians,
   [itm_great_lance,itm_great_lance,itm_great_sword,itm_morningstar,itm_sword,itm_kite_shield,itm_war_shield,itm_kite_shield,itm_kite_shield,itm_heraldric_shield,itm_heater_shield,itm_coat_of_plates,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_great_helmet,itm_bascinet,itm_hunter,itm_charger,itm_charger,itm_warhorse,itm_leather_gloves],
   def_attrib|level(25),wp(130),knows_common|knows_riding_5|knows_shield_3|knows_ironflesh_3,swadian_face1, swadian_face2],

# Vaegir watchman? 
  ["vaegir_peasant","Vaegir Peasant","Vaegir Peasants",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_vaegirs,
   [itm_scythe,itm_cleaver,itm_knife,itm_hatchet,itm_cudgel,itm_stones,itm_rawhide_coat,itm_nomad_armor,itm_nomad_boots],
   def_attrib|level(4),wp(60),knows_common,vaegir_face1, vaegir_face2],
  ["vaegir_footman","Vaegir Footman","Vaegir Footmen",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_vaegirs,
   [itm_spiked_club,itm_hand_axe,itm_nordic_sword,itm_voulge,itm_nordic_shield,itm_round_shield,itm_spear,itm_nomad_cap,itm_skullcap,itm_rawhide_coat,itm_nomad_armor,itm_nomad_boots],
   def_attrib|level(9),wp(75),knows_common,vaegir_face1, vaegir_face2],
  ["vaegir_skirmisher","Vaegir Skirmisher","Vaegir Skirmishers",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_vaegirs,
   [itm_arrows,itm_spiked_mace,itm_axe,itm_falchion,itm_short_bow,itm_short_bow,itm_hunting_bow,itm_javelin,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_leather_vest,itm_leather_vest,itm_nomad_armor,itm_nomad_boots],
   def_attrib|str_10|level(14),wp(80),knows_ironflesh_1|knows_power_draw_1,vaegir_face1, vaegir_face2],
  ["vaegir_archer","Vaegir Archer","Vaegir Archers",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_vaegirs,
   [itm_arrows,itm_battle_axe,itm_falchion,itm_scimitar,itm_nomad_bow,itm_nomad_bow,itm_short_bow,itm_leather_jerkin,itm_scale_armor,itm_leather_vest,itm_nomad_boots,itm_spiked_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_nomad_cap],
   def_attrib|str_12|level(19),wp(100),knows_ironflesh_1|knows_power_draw_2|knows_athletics_2,vaegir_face1, vaegir_face2],
  ["vaegir_marksman","Vaegir Marksman","Vaegir Marksmen",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_vaegirs,
   [itm_arrows,itm_battle_axe,itm_falchion,itm_scimitar,itm_strong_bow,itm_strong_bow,itm_nomad_bow,itm_nomad_bow,itm_nomad_bow,itm_nomad_bow,itm_mail_hauberk,itm_padded_leather,itm_scale_armor,itm_nomad_boots,itm_spiked_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_nomad_cap],
   def_attrib|str_14|level(24),wp(130),knows_ironflesh_3|knows_power_draw_3|knows_athletics_3,vaegir_face1, vaegir_face2],
  ["vaegir_veteran","Vaegir Veteran","Vaegir Veterans",tf_mounted|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_vaegirs,
   [itm_spiked_mace,itm_axe,itm_broadsword,itm_falchion,itm_nordic_shield,itm_round_shield,itm_spear,itm_steppe_cap,itm_nomad_cap,itm_leather_jerkin,itm_nomad_armor,itm_nomad_boots,itm_saddle_horse],
   def_attrib|level(14),wp(85),knows_riding_1|knows_ironflesh_1|knows_shield_2,vaegir_face1, vaegir_face2],
  ["vaegir_infantry","Vaegir Infantry","Vaegir Infantries",tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_vaegirs,
   [itm_pike,itm_spear,itm_battle_axe,itm_falchion,itm_scimitar,itm_nordic_shield,itm_round_shield,itm_spear,itm_mail_hauberk,itm_scale_armor,itm_nomad_boots,itm_spiked_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_nomad_cap],
   def_attrib|level(19),wp(100),knows_athletics_2|knows_ironflesh_2|knows_power_strike_2|knows_shield_2,vaegir_face1, vaegir_face2],
  ["vaegir_guard","Vaegir Guard","Vaegir Guards",tf_mounted|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_vaegirs,
   [itm_ashwood_pike,itm_battle_fork,itm_bardiche,itm_battle_axe,itm_fighting_axe,itm_kite_shield_,itm_war_shield,itm_kite_shield,itm_heater_shield,itm_mail_hauberk,itm_lamellar_cuirass,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_leather_gloves],
   def_attrib|level(25),wp(130),knows_athletics_3|knows_shield_2|knows_ironflesh_3,vaegir_face1, vaegir_face2],
  ["vaegir_horseman","Vaegir Horseman","Vaegir Horsemen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_vaegirs,
   [itm_lance,itm_battle_axe,itm_falchion,itm_scimitar,itm_nordic_shield,itm_round_shield,itm_spear,itm_mail_hauberk,itm_scale_armor,itm_nomad_boots,itm_spiked_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_nomad_cap,itm_steppe_horse,itm_hunter],
   def_attrib|level(19),wp(100),knows_riding_3|knows_ironflesh_2,vaegir_face1, vaegir_face2],
  ["vaegir_knight","Vaegir Knight","Vaegir Knights",tf_mounted|tf_guarantee_boots|tf_guarantee_gloves|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_vaegirs,
   [itm_lance,itm_lance,itm_bardiche,itm_war_axe,itm_fighting_axe,itm_kite_shield_,itm_war_shield,itm_kite_shield_,itm_heater_shield,itm_mail_hauberk,itm_lamellar_cuirass,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_warhorse,itm_warhorse,itm_warhorse,itm_leather_gloves],
   def_attrib|level(25),wp(130),knows_riding_4|knows_shield_2|knows_ironflesh_3,vaegir_face1, vaegir_face2],

  
  ["river_pirate","River Pirate","River Pirates",0,0,0,fac_outlaws,
   [itm_hatchet,itm_club,itm_butchering_knife,itm_falchion,itm_rawhide_coat,itm_stones,itm_nomad_armor,itm_nomad_armor,itm_woolen_cap,itm_woolen_cap,itm_woolen_cap,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(4),wp(20),knows_common,pirate_face1, pirate_face2],
  ["bandit","Bandit","Bandits",tf_guarantee_armor,0,0,fac_outlaws,
   [itm_arrows,itm_spiked_mace,itm_broadsword,itm_short_bow,itm_falchion,itm_nordic_shield,itm_rawhide_coat,itm_leather_cap,itm_leather_jerkin,itm_nomad_armor,itm_nomad_boots,itm_wrapping_boots,itm_saddle_horse],
   def_attrib|level(10),wp(60),knows_common|knows_power_draw_1,bandit_face1, bandit_face2],
  ["brigand","Brigand","Brigands",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_outlaws,
   [itm_arrows,itm_spiked_mace,itm_broadsword,itm_falchion,itm_wooden_shield,itm_round_shield,itm_long_bow,itm_leather_cap,itm_leather_jerkin,itm_nomad_boots,itm_saddle_horse],
   def_attrib|level(16),wp(90),knows_common|knows_power_draw_3,bandit_face1, bandit_face2],
  ["mountain_bandit","Mountain Bandit","Mountain Bandits",tf_guarantee_armor,0,0,fac_outlaws,
   [itm_arrows,itm_broadsword,itm_winged_mace,itm_short_bow,itm_javelin,itm_felt_hat,itm_skullcap,itm_khergit_armor,itm_nomad_armor,itm_rawhide_coat,itm_hide_boots,itm_wooden_shield,itm_nordic_shield,itm_saddle_horse],
   def_attrib|level(11),wp(90),knows_common|knows_power_draw_2,bandit_face1, bandit_face2],
  ["sea_raider","Sea Raider","Sea Raiders",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_outlaws,
   [itm_arrows,itm_nordic_sword,itm_nordic_sword,itm_fighting_axe,itm_battle_axe,itm_spiked_mace,itm_nordic_shield,itm_nordic_shield,itm_nordic_shield,itm_round_shield,itm_long_bow,itm_javelin,itm_throwing_axes,itm_nordic_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_mail_hauberk,itm_mail_hauberk,itm_mail_hauberk,itm_leather_jerkin,itm_leather_boots],
   def_attrib|level(16),wp(110),knows_ironflesh_2|knows_power_strike_2|knows_power_draw_3|knows_power_throw_2|knows_riding_1|knows_athletics_2,vaegir_face1, vaegir_face2],
  

  ["manhunter","Manhunter","Manhunters",tf_guarantee_armor,0,0,fac_manhunters,
   [itm_spiked_mace,itm_club,itm_woolen_cap,itm_rawhide_coat,itm_coarse_tunic,itm_nomad_armor,itm_nordic_shield,itm_nomad_boots,itm_wrapping_boots,itm_sumpter_horse],
   def_attrib|level(10),wp(50),knows_common,bandit_face1, bandit_face2],
  ["deserter","Deserter","Deserters",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_swadian_deserters,
   [itm_arrows,itm_spear,itm_fighting_pick,itm_short_bow,itm_sword,itm_voulge,itm_nordic_shield,itm_round_shield,itm_kettle_hat,itm_leather_cap,itm_padded_cloth,itm_leather_armor,itm_scale_armor,itm_saddle_horse],
   def_attrib|level(12),wp(60),knows_common,bandit_face1, bandit_face2],


#fac_slavers
  ["slave_keeper","Slave Keeper","Slave Keepers",tf_guarantee_armor,0,0,fac_slavers,
   [itm_cudgel,itm_club,itm_woolen_cap,itm_rawhide_coat,itm_coarse_tunic,itm_nomad_armor,itm_nordic_shield,itm_nomad_boots,itm_wrapping_boots,itm_sumpter_horse],
   def_attrib|level(10),wp(60),knows_common,bandit_face1, bandit_face2],
  ["slave_driver","Slave Driver","Slave Drivers",tf_guarantee_armor,0,0,fac_slavers,
   [itm_spiked_mace,itm_club,itm_woolen_cap,itm_rawhide_coat,itm_coarse_tunic,itm_nomad_armor,itm_nordic_shield,itm_nomad_boots,itm_wrapping_boots,itm_sumpter_horse],
   def_attrib|level(14),wp(80),knows_common,bandit_face1, bandit_face2],
  ["slave_hunter","Slave Hunter","Slave Hunters",tf_guarantee_armor,0,0,fac_slavers,
   [itm_winged_mace,itm_club,itm_woolen_cap,itm_rawhide_coat,itm_coarse_tunic,itm_nomad_armor,itm_nordic_shield,itm_nomad_boots,itm_wrapping_boots,itm_sumpter_horse],
   def_attrib|level(18),wp(90),knows_common,bandit_face1, bandit_face2],
  ["slave_crusher","Slave Crusher","Slave Crushers",tf_mounted|tf_guarantee_armor,0,0,fac_slavers,
   [itm_maul,itm_winged_mace,itm_leather_vest,itm_nordic_shield,itm_nomad_boots,itm_leather_boots,itm_saddle_horse],
   def_attrib|level(22),wp(110),knows_common|knows_power_strike_2,bandit_face1, bandit_face2],
  ["slaver_chief","Slaver Chief","Slaver Chiefs",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_slavers,
   [itm_maul,itm_winged_mace,itm_mail_hauberk,itm_steel_shield,itm_nomad_boots,itm_leather_boots,itm_hunter],
   def_attrib|level(26),wp(130),knows_common|knows_riding_3|knows_power_strike_3,bandit_face1, bandit_face2],

#Rhodok tribal, Hunter, warrior, veteran, warchief

  ["khergit_tribesman","Khergit Tribesman","Khergit Tribesmen",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_khergits,
   [itm_arrows,itm_club,itm_winged_mace,itm_spear,itm_nomad_bow,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_khergit_armor,itm_nomad_armor,itm_leather_vest,itm_hide_boots,itm_nomad_shield,itm_wooden_shield,itm_saddle_horse,itm_steppe_horse],
   def_attrib|level(9),wp(40),knows_common|knows_riding_2|knows_power_draw_2,khergit_face1, khergit_face2],
  ["khergit_skirmisher","Khergit Skirmisher","Khergit Skirmishers",tf_mounted|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_khergits,
   [itm_arrows,itm_scimitar,itm_winged_mace,itm_spear,itm_nomad_bow,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_khergit_armor,itm_nomad_armor,itm_leather_vest,itm_hide_boots,itm_nomad_shield,itm_wooden_shield,itm_saddle_horse,itm_steppe_horse],
   def_attrib|level(9),wp(40),knows_common|knows_riding_3|knows_power_draw_2,khergit_face1, khergit_face2],
  ["khergit_raider","Khergit Raider","Khergit Raiders",tf_mounted|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_khergits,
   [itm_arrows,itm_scimitar,itm_winged_mace,itm_spear,itm_nomad_bow,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_spiked_helmet,itm_khergit_armor,itm_nomad_armor,itm_leather_vest,itm_lamellar_cuirass,itm_hide_boots,itm_nomad_shield,itm_nomad_shield,itm_round_shield,itm_saddle_horse,itm_steppe_horse],
   def_attrib|level(14),wp(70),knows_common|knows_riding_4|knows_power_draw_3|knows_ironflesh_1,khergit_face1, khergit_face2],
  ["khergit_horseman","Khergit Horseman","Khergit Horsemen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_khergits,
   [itm_arrows,itm_scimitar,itm_winged_mace,itm_spear,itm_khergit_bow,itm_nomad_bow,itm_nomad_bow,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_spiked_helmet,itm_khergit_armor,itm_nomad_armor,itm_leather_vest,itm_lamellar_cuirass,itm_hide_boots,itm_nomad_shield,itm_nomad_shield,itm_round_shield,itm_saddle_horse,itm_steppe_horse],
   def_attrib|level(14),wp(70),knows_riding_3|knows_power_draw_3|knows_ironflesh_2,khergit_face1, khergit_face2],
  ["khergit_cavalry","Khergit Cavalry","Khergit Cavalry",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_khergits,
   [itm_arrows,itm_scimitar,itm_scimitar,itm_winged_mace,itm_spear,itm_lance,itm_khergit_bow, itm_strong_bow,itm_short_bow,itm_steppe_cap,itm_nomad_cap,itm_spiked_helmet,itm_spiked_helmet,itm_mail_hauberk,itm_lamellar_cuirass,itm_hide_boots,itm_nomad_shield,itm_nomad_shield,itm_round_shield,itm_saddle_horse,itm_steppe_horse],
   def_attrib|level(21),wp(100),knows_riding_5|knows_power_draw_4|knows_ironflesh_3,khergit_face1, khergit_face2],

  ["steppe_bandit","Steppe Bandit","Steppe Bandits",tf_mounted,0,0,fac_khergits,
   [itm_arrows,itm_scimitar,itm_winged_mace,itm_spear,itm_nomad_bow,itm_nomad_bow,itm_short_bow,itm_jarid,itm_leather_steppe_cap_a,itm_leather_steppe_cap_b,itm_leather_steppe_cap_c,itm_khergit_armor,itm_nomad_armor,itm_leather_vest,itm_hide_boots,itm_hide_boots,itm_nomad_shield,itm_nomad_shield,itm_round_shield,itm_saddle_horse,itm_steppe_horse,itm_steppe_horse],
   def_attrib|level(14),wp(70),knows_riding_3|knows_horse_archery_2|knows_power_draw_2,khergit_face1, khergit_face2],
  ["black_khergit_horseman","Black Khergit Horseman","Black Khergit Horsemen",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits,
   [itm_arrows,itm_nomad_sabre,itm_scimitar,itm_scimitar,itm_winged_mace,itm_spear,itm_lance,itm_khergit_bow,itm_khergit_bow,itm_nomad_bow,itm_nomad_bow,itm_steppe_cap,itm_nomad_cap,itm_khergit_war_helmet,itm_khergit_war_helmet,itm_mail_hauberk,itm_lamellar_cuirass,itm_hide_boots,itm_nomad_shield,itm_nomad_shield,itm_round_shield,itm_saddle_horse,itm_steppe_horse],
   def_attrib|level(21),wp(100),knows_riding_3|knows_ironflesh_3|knows_horse_archery_3|knows_power_draw_3,khergit_face1, khergit_face2],


  ["inquisition_knight","Inquisition Knight","Inquisition Knights",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_swadians,
   [itm_spear,itm_bastard_sword,itm_great_sword,itm_morningstar,itm_sword,itm_kite_shield_,itm_war_shield,itm_kite_shield,itm_heraldric_shield,itm_heater_shield,itm_coat_of_plates,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_helmet_with_neckguard,itm_bascinet,itm_guard_helmet,itm_hunter,itm_hunter,itm_charger,itm_warhorse],
   def_attrib|level(25),wp(120),knows_common|knows_riding_5|knows_shield_3|knows_ironflesh_3|knows_power_strike_3,swadian_face1, swadian_face2],



  ["undead_walker","undead_walker","undead_walkers",tf_undead|tf_allways_fall_dead,0,0,fac_undeads,
   [], 
   def_attrib|level(3),wp(60),knows_common,undead_face1, undead_face2],
  ["undead_horseman","undead_horseman","undead_horsemen",tf_undead|tf_allways_fall_dead|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_undeads,
   [], 
   def_attrib|level(19),wp(100),knows_common,undead_face1, undead_face2],
  ["undead_nomad","undead_nomad","undead_nomads",tf_undead|tf_allways_fall_dead|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits,
   [], 
   def_attrib|level(21),wp(100),knows_common|knows_riding_4,khergit_face1, khergit_face2],
  ["undead","undead","undead",tf_undead|tf_allways_fall_dead,0,0,fac_undeads,
   [], 
   def_attrib|level(3),wp(60),knows_common,undead_face1, undead_face2],
  ["hell_knight","hell_knight","hell_knights",tf_undead|tf_allways_fall_dead|tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_undeads,
   [], 
   def_attrib|level(23),wp(100),knows_common|knows_riding_3,undead_face1, undead_face2],



  ["follower_woman","Follower Woman","Follower Women",tf_female|tf_guarantee_armor,0,0,fac_commoners,
   [itm_bolts,itm_light_crossbow,itm_short_bow,itm_crossbow,itm_nordic_shield,itm_round_shield,itm_hatchet,itm_hand_axe,itm_voulge,itm_fighting_pick,itm_club,itm_dress,itm_woolen_dress, itm_skullcap, itm_wrapping_boots],
   def_attrib|level(5),wp(70),knows_common,refugee_face1,refugee_face2],
  ["hunter_woman","Hunter Woman","Hunter Women",tf_female|tf_guarantee_armor,0,0,fac_commoners,
   [itm_bolts,itm_arrows,itm_light_crossbow,itm_short_bow,itm_crossbow,itm_nordic_shield,itm_round_shield,itm_hatchet,itm_hand_axe,itm_voulge,itm_fighting_pick,itm_club,itm_dress,itm_woolen_dress, itm_skullcap, itm_wrapping_boots],
   def_attrib|level(10),wp(85),knows_common,refugee_face1,refugee_face2],
  ["fighter_woman","Fighter Woman","Fighter Women",tf_female|tf_guarantee_boots|tf_guarantee_armor,0,0,fac_commoners,
   [itm_arrows,itm_light_crossbow,itm_short_bow,itm_crossbow,itm_nordic_shield,itm_round_shield,itm_hatchet,itm_voulge,itm_leather_jerkin,itm_leather_vest, itm_skullcap, itm_wrapping_boots],
   def_attrib|level(16),wp(100),knows_common|knows_riding_3|knows_athletics_2|knows_ironflesh_1,refugee_face1,refugee_face2],
  ["sword_sister","Sword Sister","Sword Sisters",tf_female|tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse,0,0,fac_commoners,
   [itm_bolts,itm_bastard_sword,itm_scimitar,itm_nordic_shield,itm_kite_shield,itm_crossbow,itm_nordic_shield,itm_plate_armor,itm_coat_of_plates,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_helmet_with_neckguard,itm_courser,itm_leather_gloves],
   def_attrib|level(22),wp(140),knows_common|knows_riding_5|knows_athletics_3|knows_ironflesh_2|knows_shield_2,refugee_face1,refugee_face2],

  ["pilgrim","Pilgrim","Pilgrims",tf_female|tf_guarantee_armor,0,0,fac_commoners,
   [itm_knife,itm_pitch_fork,itm_sickle,itm_hatchet,itm_club,itm_dress,itm_robe,itm_woolen_dress, itm_headcloth, itm_woolen_hood, itm_wrapping_boots],
   def_attrib|level(1),wp(40),knows_common,refugee_face1,refugee_face2],
  ["refugee","Refugee","Refugees",tf_female|tf_guarantee_armor,0,0,fac_commoners,
   [itm_knife,itm_pitch_fork,itm_sickle,itm_hatchet,itm_club,itm_dress,itm_robe,itm_woolen_dress, itm_headcloth, itm_woolen_hood, itm_wrapping_boots],
   def_attrib|level(1),wp(45),knows_common,refugee_face1,refugee_face2],
  ["peasant_woman","Peasant Woman","Peasant Women",tf_female|tf_guarantee_armor,0,0,fac_commoners,
   [itm_knife,itm_pitch_fork,itm_sickle,itm_hatchet,itm_club,itm_dress,itm_woolen_dress, itm_headcloth, itm_woolen_hood, itm_wrapping_boots],
   def_attrib|level(1),wp(40),knows_common,refugee_face1,refugee_face2],

  ["vagabond","Vagabond","Vagabonds",0,0,0,fac_commoners,
   [itm_cleaver,itm_knife,itm_hatchet,itm_club,itm_leather_cap,itm_felt_hat,itm_woolen_cap,itm_linen_tunic,itm_nomad_boots,itm_wrapping_boots],
   def_attrib|level(2),wp(45),knows_common,bandit_face1, bandit_face2],
  ["vagabond_woman","Vagabond Woman","Vagabond Women",tf_female|tf_guarantee_armor,0,0,fac_commoners,
   [itm_knife,itm_hatchet,itm_club,itm_dress,itm_woolen_dress, itm_headcloth, itm_woolen_hood, itm_wrapping_boots],
   def_attrib|level(1),wp(40),knows_common,refugee_face1,refugee_face2],
 
  ["dark_knight","Dark Knight","Dark Knights",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_dark_knights,
   [itm_spear,itm_great_sword,itm_sword_of_war,itm_morningstar,itm_great_axe,itm_steel_shield,itm_war_shield,itm_steel_shield,itm_heater_shield,itm_black_armor,itm_black_greaves,itm_bascinet,itm_guard_helmet,itm_saddle_horse,itm_warhorse,itm_leather_gloves],
   def_attrib|level(33),wp(160),knows_common|knows_riding_5|knows_shield_3|knows_ironflesh_4|knows_power_strike_3,swadian_face1, swadian_face2],
  ["dark_hunter","Dark Hunter","Dark Hunters",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_dark_knights,
   [itm_spear,itm_broadsword,itm_battle_axe,itm_morningstar,itm_kite_shield_,itm_war_shield,itm_heraldric_shield,itm_heater_shield,itm_leather_jerkin,itm_iron_greaves,itm_guard_helmet,itm_saddle_horse,itm_warhorse],
   def_attrib|level(23),wp(120),knows_common|knows_riding_4|knows_shield_3|knows_ironflesh_2|knows_power_strike_2,swadian_face1, swadian_face2],


  ["caravan_master","Caravan Master","Caravan Masters",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_commoners,
   [itm_sword,itm_leather_jacket,itm_hide_boots,itm_saddle_horse,
    itm_saddle_horse,itm_saddle_horse,itm_saddle_horse,
    itm_leather_jacket, itm_leather_cap],
   def_attrib|level(9),wp(100),knows_common|knows_riding_4|knows_ironflesh_3,swadian_face1, swadian_face2],

  ["kidnapped_girl","Kidnapped Girl","Kidnapped Girls",tf_hero|tf_female,0,reserved,fac_commoners,
   [itm_dress,itm_leather_boots],
   def_attrib|level(2),wp(50),knows_common|knows_riding_2,0x0000000000100104000011970c848592],

  ["tax_collector","Tax Collector","Tax Collectors",tf_hero|tf_no_capture_alive,0,0,fac_commoners,
   [itm_sword,itm_leather_jacket,itm_hide_boots,itm_saddle_horse],
   def_attrib|level(9),wp(80),knows_common,0x000000000011000000000330501180a2],
  ["nobleman","Nobleman","Nobleman",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_commoners,
   [itm_sword,itm_leather_jacket,itm_hide_boots,itm_saddle_horse],
   def_attrib|level(9),wp(150),knows_common|knows_riding_5|knows_ironflesh_3,0x0000000000110000000003395063803a],


  ["runaway_slave","Runaway Slave","Runaway Slaves",0,0,reserved,fac_commoners,
   [itm_club,itm_cudgel, itm_cleaver,itm_wooden_shield,itm_round_shield,itm_nordic_shield,itm_wooden_shield,itm_wooden_shield,itm_wooden_shield],
   def_attrib|level(1),wp(20),knows_common,bandit_face1, bandit_face2],
  ["desert_bandit","Desert Bandit","Desert Bandits",0,0,0,fac_outlaws,
   [itm_arrows,itm_scimitar,itm_winged_mace,itm_spear,itm_short_bow,itm_javelin,itm_steppe_cap,itm_nomad_cap,itm_khergit_armor,itm_nomad_armor,itm_leather_vest,itm_hide_boots,itm_nomad_shield,itm_round_shield,itm_saddle_horse,itm_steppe_horse],
   def_attrib|level(4),wp(20),knows_common,bandit_face1, bandit_face2],
  ["slaver","Slaver","Slavers",0,0,reserved,fac_slavers,
   [itm_arrows,itm_spear,itm_short_bow,itm_wooden_shield,itm_saddle_horse],
   def_attrib|level(4),wp(30),knows_common,bandit_face1, bandit_face2],


  ["enemy_hero","Enemy Hero","Enemy Hero",tf_hero, 0,reserved, fac_outlaws,[itm_saddle_horse,itm_military_pick,itm_wooden_shield,itm_steppe_cap,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x000000000000020500001ab93d11e095],

# Zendar
  ["tournament_master","Tournament Master","Tournament Master",tf_hero, scn_zendar_center|entry(1),reserved,  fac_commoners,[itm_nomad_armor,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x000000000008414401e28f534c8a2d09],
  ["trainer","Trainer","Trainer",tf_hero, scn_zendar_center|entry(2),reserved,  fac_commoners,[itm_leather_jerkin,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x00000000000430c701ea98836781647f],
  ["Constable_Hareck","Constable Hareck","Constable Hareck",tf_hero, scn_zendar_center|entry(5),reserved,  fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,0x00000000000c41c001fb15234eb6dd3f],
  ["Ramun,_the_slave_trader","Ramun, the slave trader","Ramun, the slave trader",tf_hero, scn_zendar_center|entry(6),reserved, fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,0x000000000010904001ee2b08ee4c1bbf],

  ["Xerina","Xerina","Xerina",tf_hero|tf_female, scn_the_happy_boar|entry(5),reserved,  fac_commoners,[itm_leather_jerkin,itm_hide_boots],def_attrib|str_15|agi_15|level(39),wp(312),knows_power_strike_5|knows_ironflesh_5|knows_riding_6|knows_power_draw_4|knows_athletics_8|knows_shield_3,0x00000000000c300301f02b0e97b091fc],
  ["Dranton","Dranton","Dranton",tf_hero, scn_the_happy_boar|entry(2),reserved,  fac_commoners,[itm_leather_vest,itm_hide_boots],def_attrib|str_15|agi_14|level(42),wp(324),knows_power_strike_5|knows_ironflesh_7|knows_riding_4|knows_power_draw_4|knows_athletics_4|knows_shield_3,0x000000000004120101e4420000028f77],
  ["Kradus","Kradus","Kradus",tf_hero, scn_the_happy_boar|entry(3),reserved,  fac_commoners,[itm_padded_leather,itm_hide_boots],def_attrib|str_15|agi_14|level(43),wp(270),knows_power_strike_5|knows_ironflesh_7|knows_riding_4|knows_power_draw_4|knows_athletics_4|knows_shield_3,0x000000000010424401fe1c1147a619e7],

#Sargoth
  #halkard, hardawk. lord_taucard lord_caupard. lord_paugard

#Salt mine
  ["Galeas","Galeas","Galeas",tf_hero, scn_salt_mine|entry(3),reserved, fac_commoners,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_common,0x000000000004718201c073191a9bb10c],

#Dhorak keep
  ["Baron_Rolf","Baron Rolf","Baron Rolf",tf_hero, scn_dhorak_keep|entry(1),reserved,  fac_commoners,[itm_leather_jerkin,itm_nomad_boots],def_attrib|level(29),wp(165),knows_common,0x00000000000c840001f8c0a4ab8ad50a],
  ["Jabbara","Jabbara","Jabbara",tf_hero, 0,reserved,  fac_commoners,[itm_rawhide_coat,itm_nomad_boots],def_attrib|level(7),wp(80),knows_common,0x0000000000000145000007a54e58f0d1],

  ["Marnid","Marnid","Marnid", tf_hero|tf_unkillable, scn_the_happy_boar|entry(4),reserved, fac_commoners,
    [itm_bt_hunter,itm_linen_tunic,itm_bt_black_greaves,itm_military_hammer,itm_war_bow,itm_power_flintlock_pistol,itm_power_cartridges],
    def_hero_attrib|level(12),wp(240),knows_hero|knows_wound_treatment_10|knows_surgery_10|knows_first_aid_10,0x00000000000c600301c2510211a5b292],
      
  ["borcha","Borcha","Borcha",tf_hero|tf_unkillable, scn_town_13_castle|entry(6),reserved, fac_commoners,
    [itm_bt_hunter,itm_military_hammer,itm_war_bow,itm_power_flintlock_pistol,itm_power_cartridges],
    def_hero_attrib|level(16),wp(200),knows_hero|knows_pathfinding_6|knows_tracking_6|knows_spotting_6,0x00000000000c524301c946981065126e],
    
  ["ymira","Ymira","Ymira",tf_female|tf_hero|tf_unkillable, scn_the_happy_boar|entry(6), reserved, fac_commoners,
    [itm_bt_hunter,itm_woolen_dress,itm_military_hammer,itm_war_bow,itm_power_flintlock_pistol,itm_power_cartridges],
    def_hero_attrib|level(6),wp(100),knows_hero|knows_wound_treatment_2|knows_trade_2|knows_horse_archery_6|knows_shield_4,0x000000000000000201c152351bab4558],

#Tutorial
  ["tutorial_trainer","Training Ground Master","Training Ground Master",tf_hero, scn_training_ground|entry(2),reserved, fac_commoners,[itm_nomad_armor,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x000000000008414401e28f534c8a2d09],


#governers olgrel rasevas
  ["town_1_ruler_a", "King Harlaus",  "King Harlaus",  tf_hero, scn_town_1_castle|entry(9),reserved,  fac_swadians,[itm_saddle_horse,itm_courtly_outfit,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000010908101e36db44b75b6dd],
  ["town_2_ruler_a", "Duke Taugard",  "Duke Taugard",  tf_hero, scn_town_2_castle|entry(9),reserved,  fac_swadians,[itm_saddle_horse,itm_courtly_outfit,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000000310401e06db86375f6da],
  ["town_3_ruler_a", "Count Grimar",  "Count Grimar",  tf_hero, scn_town_3_castle|entry(9),reserved, fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000004430301e46136eb75bc0a],
  ["town_4_ruler_a", "Count Haxalye", "Count Haxalye", tf_hero, scn_town_4_castle|entry(9),reserved,  fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000010918701e77136e905bc0e],
  ["town_5_ruler_a", "Count Belicha", "Count Belicha", tf_hero, scn_town_5_castle|entry(9),reserved, fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000421c801e7713729c5b8ce],
  ["town_6_ruler_a", "Count Nourbis", "Count Nourbis", tf_hero, scn_town_6_castle|entry(9),reserved,  fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c640501e371b72bcdb724],
  ["town_7_ruler_a", "Count Rhudolg", "Count Rhudolg", tf_hero, scn_town_7_castle|entry(9),reserved,  fac_swadians,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c710201fa51b7286db721],
 
  ["town_8_ruler_b", "King Yaroglek", "King_yaroglek", tf_hero, scn_town_8_castle|entry(9),reserved,  fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000000128801f294ca6d66d555],
  ["town_9_ruler_b", "Count Aolbrug", "Count_Aolbrug", tf_hero, scn_town_9_castle|entry(9),reserved,  fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000004234401f26a271c8d38ea],
  ["town_10_ruler_b","Count Rasevas", "Count_Rasevas", tf_hero, scn_town_10_castle|entry(9),reserved, fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000001032c201f38e269372471c],
  ["town_11_ruler_b","Count Leomir",  "Count_Leomir",  tf_hero, scn_town_11_castle|entry(9),reserved,  fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c538001f55148936d3895],
  ["town_12_ruler_b","Count Haelbrad","Count_Haelbrad",tf_hero, scn_town_12_castle|entry(9),reserved,  fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000410c701f38598ac8aaaab],
  ["town_13_ruler_b","Count Mira",    "Count_Mira",    tf_hero, scn_town_13_castle|entry(9),reserved, fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000004204401f390c515555594],
  ["town_14_ruler_b","Count Camechaw","Count_Camechaw",tf_hero, scn_town_14_castle|entry(9),reserved,  fac_vaegirs,[itm_saddle_horse,itm_leather_jacket,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000008318101f390c515555594],


#Arena Masters
  ["town_1_arena_master", "Tournament Master","Tournament Master",tf_hero, scn_town_1_arena|entry(52),reserved,  fac_commoners,[itm_coarse_tunic,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x000000000010000c01cb97582d8d6a53],
  ["town_2_arena_master", "Tournament Master","Tournament Master",tf_hero, scn_town_2_arena|entry(52),reserved,  fac_commoners,[itm_linen_tunic,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x00000000000c961401e3b96b63784f67],
  ["town_3_arena_master", "Tournament Master","Tournament Master",tf_hero, scn_town_3_arena|entry(52),reserved,  fac_commoners,[itm_nomad_armor,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x000000000010550b01f01eecd494b4ac],
  ["town_4_arena_master", "Tournament Master","Tournament Master",tf_hero, scn_town_4_arena|entry(52),reserved,  fac_commoners,[itm_coarse_tunic,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x00000000000c61ce01e1381acec41c91],
  ["town_5_arena_master", "Tournament Master","Tournament Master",tf_hero, scn_town_5_arena|entry(52),reserved,  fac_commoners,[itm_linen_tunic,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x000000000010228701f54df58966b059],
  ["town_6_arena_master", "Tournament Master","Tournament Master",tf_hero, scn_town_6_arena|entry(52),reserved,  fac_commoners,[itm_leather_jerkin,itm_leather_boots],def_attrib|level(2),wp(20),knows_common,0x000000000000630001cffa432e5b66f3],
  ["town_7_arena_master", "Tournament Master","Tournament Master",tf_hero, scn_town_7_arena|entry(52),reserved,  fac_commoners,[itm_padded_leather,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x00000000000832cb01eb1dc8ccb58676],
  ["town_8_arena_master", "Tournament Master","Tournament Master",tf_hero, scn_town_8_arena|entry(52),reserved,  fac_commoners,[itm_linen_tunic,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x00000000000070ce01d9d184f4afe8e8],
  ["town_9_arena_master", "Tournament Master","Tournament Master",tf_hero, scn_town_9_arena|entry(52),reserved,  fac_commoners,[itm_padded_leather,itm_leather_boots],def_attrib|level(2),wp(20),knows_common,0x000000000008419401e7a1cd4864e0c4],
  ["town_10_arena_master","Tournament Master","Tournament Master",tf_hero, scn_town_10_arena|entry(52),reserved,  fac_commoners,[itm_nomad_armor,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x000000000008705301deb7032ea4d5b0],
  ["town_11_arena_master","Tournament Master","Tournament Master",tf_hero, scn_town_11_arena|entry(52),reserved,  fac_commoners,[itm_coarse_tunic,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x000000000004714901f507e612b91dc6],
  ["town_12_arena_master","Tournament Master","Tournament Master",tf_hero, scn_town_12_arena|entry(52),reserved,  fac_commoners,[itm_leather_jerkin,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x00000000000c808401cc6096f0503613],
  ["town_13_arena_master","Tournament Master","Tournament Master",tf_hero, scn_town_13_arena|entry(52),reserved,  fac_commoners,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(2),wp(20),knows_common,0x000000000008500401ed3bc36349d78e],
  ["town_14_arena_master","Tournament Master","Tournament Master",tf_hero, scn_town_14_arena|entry(52),reserved,  fac_commoners,[itm_padded_leather,itm_hide_boots],def_attrib|level(2),wp(20),knows_common,0x000000000010710601ce581b6e635566],



# Armor Merchants
  ["zendar_armorer","Rabugti","Rabugti",tf_hero|tf_is_merchant, scn_zendar_center|entry(4),0,  fac_commoners,[itm_coarse_tunic,itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c318301f24e38a36e38e3],

  ["town_1_armorer","Urumuda","Urumuda",tf_hero|tf_is_merchant, scn_town_1_center|entry(9),0, fac_swadians,[itm_linen_tunic],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004428401f46e44a27144e3],
  ["town_2_armorer","Alin","Alin",tf_hero|tf_female|tf_is_merchant, scn_town_2_center|entry(9),0, fac_swadians,[itm_woolen_dress],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004300101c36db6db6db6db],
  ["town_3_armorer","Ganzo","Ganzo",tf_hero|tf_is_merchant, scn_town_3_center|entry(9),0, fac_swadians,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c530701f17944a25164e1],
  ["town_4_armorer","Beranz","Beranz",tf_hero|tf_is_merchant, scn_town_4_center|entry(9),0, fac_swadians,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c840501f36db6db7134db],
  ["town_5_armorer","Mirchaud","Mirchaud",tf_hero|tf_is_merchant, scn_town_5_center|entry(9),0, fac_swadians,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c000601f36db6db7134db],
  ["town_6_armorer","Stamar","Stamar",tf_hero|tf_is_merchant, scn_town_6_center|entry(9),0, fac_swadians,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c10c801db6db6dd7598aa],
  ["town_7_armorer","Regos","Regos",tf_hero|tf_is_merchant, scn_town_7_center|entry(9),0, fac_swadians,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000010214101de2f64db6db58d],
  
  ["town_8_armorer","Meltor","Meltor",tf_hero|tf_is_merchant, scn_town_8_center|entry(9),0, fac_vaegirs,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000010318401c96db4db6db58d],
  ["town_9_armorer","Imirza","Imirza",tf_hero|tf_is_merchant, scn_town_9_center|entry(9),0, fac_vaegirs,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000008520501f16db4db6db58d],
  ["town_10_armorer","Rimusk","Rimusk",tf_hero|tf_is_merchant, scn_town_10_center|entry(9),0, fac_vaegirs,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000008600701f35144db6db8a2],
  ["town_11_armorer","Talbar","Talbar",tf_hero|tf_is_merchant, scn_town_11_center|entry(9),0, fac_vaegirs,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000008408101f386c4db4dd514],
  ["town_12_armorer","Kramuk","Kramuk",tf_hero|tf_is_merchant, scn_town_12_center|entry(9),0, fac_vaegirs,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000870c501f386c4f34dbaa1],
  ["town_13_armorer","Chau","Chau",tf_hero|tf_is_merchant, scn_town_13_center|entry(9),0, fac_vaegirs,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c114901f245caf34dbaa1],
  ["town_14_armorer","Zelk","Zelk",tf_hero|tf_is_merchant, scn_town_14_center|entry(9),0, fac_vaegirs,[itm_coarse_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000001021c001f545a49b6eb2bc],

# Weapon merchants
  ["zendar_weaponsmith","Dunga","Dunga",tf_hero|tf_is_merchant, scn_zendar_center|entry(3),0,  fac_commoners,[itm_linen_tunic,itm_nomad_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000021c401f545a49b6eb2bc],

  ["town_1_weaponsmith","Struga","Struga",tf_hero|tf_is_merchant, scn_town_1_center|entry(10),0, fac_swadians,[itm_linen_tunic,itm_hide_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004424701d545a89484d69a],
  ["town_2_weaponsmith","Sebula","Sebula",tf_hero|tf_is_merchant, scn_town_2_center|entry(10),0, fac_swadians,[itm_linen_tunic,itm_nomad_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c524101f185a89496d69a],
  ["town_3_weaponsmith","Gutlans","Gutlans",tf_hero|tf_is_merchant, scn_town_3_center|entry(10),0, fac_swadians,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c624501f185a89496d69a],
  ["town_4_weaponsmith","Khavel","Khavel",tf_hero|tf_is_merchant, scn_town_4_center|entry(10),0, fac_swadians,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c730901f186e89424469a],
  ["town_5_weaponsmith","Ryis","Ryis",tf_hero|tf_is_merchant, scn_town_5_center|entry(10),0, fac_swadians,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c838101f186e89424469a],
  ["town_6_weaponsmith","Plais","Plais",tf_hero|tf_is_merchant, scn_town_6_center|entry(10),0, fac_swadians,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000010938201f36e9b0a2e431a],
  ["town_7_weaponsmith","Belgaru","Belgaru",tf_hero|tf_is_merchant, scn_town_7_center|entry(10),0, fac_swadians,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000003c401f36e9b0a2e431a],

  ["town_8_weaponsmith","Norskh","Norskh",tf_hero|tf_is_merchant, scn_town_8_center|entry(10),0, fac_vaegirs,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000004100401f4aeca8d2e231a],
  ["town_9_weaponsmith","Doru","Doru",tf_hero|tf_is_merchant, scn_town_9_center|entry(10),0, fac_vaegirs,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000420c501f254934d2e231a],
  ["town_10_weaponsmith","Nelag","Nelag",tf_hero|tf_is_merchant, scn_town_10_center|entry(10),0, fac_vaegirs,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c310501f2a76c4d2e5c4e],
  ["town_11_weaponsmith","Vlan","Vlan",tf_hero|tf_is_merchant, scn_town_11_center|entry(10),0, fac_vaegirs,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000010418601f2a5b64d2e484a],
  ["town_12_weaponsmith","Mleza","Mleza",tf_hero|tf_is_merchant, scn_town_12_center|entry(10),0, fac_vaegirs,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000852c801f2a5b6dd2e3922],
  ["town_13_weaponsmith","Dibus","Dibus",tf_hero|tf_is_merchant, scn_town_13_center|entry(10),0, fac_vaegirs,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x000000000008734001f2a5b6d2466462],
  ["town_14_weaponsmith","Crahask","Crahask",tf_hero|tf_is_merchant, scn_town_14_center|entry(10),0, fac_vaegirs,[itm_leather_jacket,itm_hide_boots],def_attrib|level(5),wp(20),knows_inventory_management_10, 0x00000000000c81c401f2a5b6d36e6db6],

#Tavern keepers
  ["zendar_tavernkeeper","Tavernkeeper","Tavernkeeper", tf_hero, scn_the_happy_boar|entry(1),0, fac_commoners,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c114501e36db6db6db6db],

  ["town_1_tavernkeeper","Turegor","Turegor",tf_hero,scn_town_1_tavern|entry(9),0, fac_swadians,[itm_leather_jacket,itm_wrapping_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c218701e351450caad563],
  ["town_2_tavernkeeper","Matheas","Matheas", tf_hero, scn_town_2_tavern|entry(9),0, fac_swadians,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000001031c101e35128e268d44b],
  ["town_3_tavernkeeper","Imbrea","Imbrea", tf_hero|tf_female, scn_town_3_tavern|entry(9),0,  fac_swadians,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000008000201ca45468bb4c4a2],
  ["town_4_tavernkeeper","Falsevor","Falsevor", tf_hero, scn_town_4_tavern|entry(9),0, fac_swadians,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000004420301e352496eb4d44b],
  ["town_5_tavernkeeper","Gharmall","Gharmall", tf_hero, scn_town_5_tavern|entry(9),0, fac_swadians,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000008520301ca492689265db6],
  ["town_6_tavernkeeper","Belinda","Belinda", tf_hero|tf_female, scn_town_6_tavern|entry(9),0, fac_swadians,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000008100401db6dc7214e26d4],
  ["town_7_tavernkeeper","Ruby","Ruby", tf_hero|tf_female, scn_town_7_tavern|entry(9),0, fac_swadians,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c200301db6dc692492492],

  ["town_8_tavernkeeper","Qaelmas","Qaelmas", tf_hero, scn_town_8_tavern|entry(9),0, fac_vaegirs,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c628601edb64b09249249],
  ["town_9_tavernkeeper","Rose","Rose", tf_hero|tf_female, scn_town_9_tavern|entry(9),0, fac_vaegirs,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000010500401db6dc692492492],
  ["town_10_tavernkeeper","Ralcha","Ralcha", tf_hero|tf_female, scn_town_10_tavern|entry(9),0, fac_vaegirs,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x000000000000000401cb6dc724912492],
  ["town_11_tavernkeeper","Naldera","Naldera", tf_hero|tf_female, scn_town_11_tavern|entry(9),0, fac_vaegirs,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c300701e36dc6db6db91a],
  ["town_12_tavernkeeper","Laruqen","Laruqen", tf_hero, scn_town_12_tavern|entry(9),0, fac_vaegirs,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c734901d924928b6c9249],
  ["town_13_tavernkeeper","Willow","Willow", tf_hero|tf_female, scn_town_13_tavern|entry(9),0, fac_vaegirs,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c100101e36924d5b5b91a],
  ["town_14_tavernkeeper","Reamald","Reamald", tf_hero, scn_town_14_tavern|entry(9),0, fac_vaegirs,[itm_leather_apron,itm_hide_boots],def_attrib|level(2),wp(20),knows_common, 0x00000000000c800001da49192d6de75d],

#Goods Merchants
  ["zendar_merchant","Prescan","Prescan",tf_hero|tf_is_merchant, scn_zendar_merchant|entry(1),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c80c301da49184925e892],

  ["town_1_merchant","Qlurzach","Qlurzach",tf_hero|tf_is_merchant, scn_town_1_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000001091c301da4914e4919295],
  ["town_2_merchant","Ruhbus","Ruhbus",tf_hero|tf_is_merchant, scn_town_2_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004020401da49144924cb6d],
  ["town_3_merchant","Givea_alsev","Givea_alsev",tf_female|tf_hero|tf_is_merchant, scn_town_3_store|entry(9),0, fac_commoners,[itm_woolen_dress,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004200201d292292249b8e4],
  ["town_4_merchant","Klargus","Klargus",tf_hero|tf_is_merchant, scn_town_4_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004130501dda8b524922492],
  ["town_5_merchant","Belanz","Belanz",tf_hero|tf_is_merchant, scn_town_5_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000008238801c92524924948b4],
  ["town_6_merchant","Meriga","Meriga",tf_female|tf_hero|tf_is_merchant, scn_town_6_store|entry(9),0, fac_commoners,[itm_woolen_dress,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000001033c301cd8524924948b4],
  ["town_7_merchant","Pelagn","Pelagn",tf_hero|tf_is_merchant, scn_town_7_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004404701ea8524db6dc34e],

  ["town_8_merchant","Tarchias","Tarchias",tf_hero|tf_is_merchant, scn_town_8_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000008500201ca86d849249249],
  ["town_9_merchant","Brula","Brula",tf_hero|tf_is_merchant, scn_town_9_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000008600801ca84936db2dadc],
  ["town_10_merchant","Irya","Irya",tf_hero|tf_is_merchant, scn_town_10_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000000700501ca8db6492edadc],
  ["town_11_merchant","Raichs","Raichs",tf_hero|tf_is_merchant, scn_town_11_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000091c601ca89a449296cd9],
  ["town_12_merchant","Bendina","Bendina",tf_female|tf_hero|tf_is_merchant, scn_town_12_store|entry(9),0, fac_commoners,[itm_woolen_dress,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c400301f6d124a492488a],
  ["town_13_merchant","Turya","Turya",tf_female|tf_hero|tf_is_merchant, scn_town_13_store|entry(9),0, fac_commoners,[itm_woolen_dress,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000000000501c945b6d289250c],
  ["town_14_merchant","Vuldrat","Vuldrat",tf_hero|tf_is_merchant, scn_town_14_store|entry(9),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x000000000004028601ea89a44929b699],

  ["salt_mine_merchant","Barezan","Barezan",tf_hero|tf_is_merchant, scn_salt_mine|entry(1),0, fac_commoners,[itm_leather_apron,itm_leather_boots],def_attrib|level(2),wp(20),knows_inventory_management_10, 0x00000000000c528601ea69b6e46dbdb6],
# Place extra merchants before this point
  ["merchants_end","merchants_end","merchants_end",tf_hero, 0,0, fac_commoners,[],def_attrib|level(2),wp(20),knows_inventory_management_10,0],

#Quest NPCs
# Chests
#  ["zendar_chest","zendar_chest","zendar_chest",tf_hero|tf_inactive, 0,reserved,  fac_vaegirs,[itm_khergit_sword,itm_khergit_guard_boots,itm_khergit_cavalry_helmet,itm_khergit_guard_armor,itm_strange_armor,itm_strange_boots,itm_strange_helmet,itm_strange_sword,itm_strange_great_sword,itm_strange_short_sword,itm_flintlock_pistol,itm_cartridges,itm_short_sword,itm_leather_steppe_cap_a,itm_leather_steppe_cap_b,itm_leather_steppe_cap_c,itm_felt_steppe_cap,itm_khergit_war_helmet,itm_khergit_guard_helmet,itm_court_dress,itm_rich_outfit],def_attrib|level(18),wp(60),knows_common, 0],
  ["zendar_chest","Zendar Chest","Zendar Chest",tf_hero|tf_inactive, 0,reserved,  fac_vaegirs,
  	[
  	  itm_padded_leather,
  	  itm_sunglasses,itm_bt_black_armor,itm_bt_black_greaves,itm_power_war_bow,itm_power_khergit_arrows,
  		itm_sunglasses,itm_bt_black_armor,itm_bt_black_greaves,itm_power_hunting_crossbow,itm_power_steel_bolts,
  		itm_sunglasses,itm_bt_black_armor,itm_bt_black_greaves,itm_great_sword_frost,
  		itm_sunglasses,itm_bt_black_armor,itm_bt_black_greaves,
  		itm_power_war_bow,itm_power_hunting_crossbow,
  		itm_sunglasses,itm_sbtai_fem_plate_bikini,itm_sbtai_fem_ceremboot,itm_hocus_flintlock_pistol,
  		itm_sunglasses,itm_sbtai_fem_plate_bikini,itm_sbtai_fem_ceremboot,itm_hocus_flintlock_pistol,
  		itm_flintlock_musket_hocus,
  		itm_bt_hunter,
  		itm_yum_dried_meat,itm_yum_dried_meat,itm_yum_dried_meat,
  		itm_bawangqiang,itm_changshengjian,itm_lengyueju,itm_tangdao,
  		
  		itm_sbtai_fem_plate1a_gold,
			itm_sbtai_fem_lamellar_gold,
			itm_steel_greaves_gold,
			itm_steel_helm_gold,
			itm_steel_armor_gold,
      itm_bt_black_armor_gold,
      itm_bt_black_greaves_gold,
      itm_bt_black_helmet_gold,
      itm_bt_black_armor_red,
      itm_bt_black_armor_green,
      itm_bt_black_armor_blue,
  	],
    def_attrib|level(18),wp(60),knows_common|knows_inventory_management_10, 0
  ],
  
  
  ["tutorial_chest_1","Melee Weapons Chest","Melee Weapons Chest",tf_hero|tf_inactive, 0,reserved,  fac_vaegirs,[itm_tutorial_sword, itm_tutorial_axe, itm_tutorial_spear, itm_tutorial_club, itm_tutorial_battle_axe],def_attrib|level(18),wp(60),knows_common, 0],
  ["tutorial_chest_2","Ranged Weapons Chest","Ranged Weapons Chest",tf_hero|tf_inactive, 0,reserved,  fac_vaegirs,[itm_tutorial_short_bow, itm_tutorial_arrows, itm_tutorial_crossbow, itm_tutorial_bolts, itm_tutorial_throwing_daggers],def_attrib|level(18),wp(60),knows_common, 0],
  ["bonus_chest_1","Bonus Chest","Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_vaegirs,[itm_strange_armor,itm_strange_short_sword],def_attrib|level(18),wp(60),knows_common, 0],
  ["bonus_chest_2","Bonus Chest","Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_vaegirs,[itm_strange_boots,itm_strange_sword],def_attrib|level(18),wp(60),knows_common, 0],
  ["bonus_chest_3","Bonus Chest","Bonus Chest",tf_hero|tf_inactive, 0,reserved,  fac_vaegirs,[itm_strange_helmet,itm_strange_great_sword],def_attrib|level(18),wp(60),knows_common, 0],

# These are used as arrays in the scripts.
  ["temp_array_a","temp_array_a","temp_array_a",tf_hero|tf_inactive, 0,reserved,  fac_vaegirs,[],def_attrib|level(18),wp(60),knows_common, 0],
  ["temp_array_b","temp_array_b","temp_array_b",tf_hero|tf_inactive, 0,reserved,  fac_vaegirs,[],def_attrib|level(18),wp(60),knows_common, 0],

  ["black_khergit_guard","Black Khergit Guard","Black Khergit Guard",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits,
   [itm_arrows,itm_nomad_sabre,itm_scimitar,itm_winged_mace,itm_lance,itm_khergit_bow,itm_khergit_guard_helmet,itm_khergit_cavalry_helmet,itm_khergit_guard_boots,itm_khergit_guard_armor,itm_nomad_shield,itm_steppe_horse,itm_warhorse],
   def_attrib|level(28),wp(140),knows_riding_6|knows_ironflesh_4|knows_horse_archery_6|knows_power_draw_6,khergit_face1, khergit_face2],


# Add Extra Quest NPCs below this point  

# SA code begin

	["triggerman_one","triggerman lv one","triggerman lv one",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_commoners,
   [itm_bt_hunter,itm_bt_black_armor,itm_spear,itm_broadsword,itm_battle_axe,itm_morningstar,itm_kite_shield_,itm_war_shield,itm_heraldric_shield,itm_heater_shield,itm_leather_jerkin,itm_iron_greaves,itm_guard_helmet,itm_saddle_horse,itm_warhorse],
   def_npc_attrib|level(20),wp(200),knows_common|knows_riding_4|knows_shield_3|knows_ironflesh_2|knows_power_strike_2,swadian_face1, swadian_face2],

  ["triggerman_two","triggerman lv two","triggerman lv two",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_commoners,
   [itm_bt_hunter,itm_bt_black_armor,itm_bt_black_greaves,itm_spear,itm_great_sword,itm_sword_of_war,itm_morningstar,itm_great_axe,itm_steel_shield,itm_war_shield,itm_steel_shield,itm_heater_shield,itm_black_armor,itm_black_greaves,itm_bascinet,itm_guard_helmet,itm_saddle_horse,itm_warhorse,itm_leather_gloves],
   def_npc_attrib|level(25),wp(250),knows_common|knows_riding_6|knows_shield_4|knows_ironflesh_4|knows_power_strike_3,swadian_face1, swadian_face2],

	["triggerman_three","triggerman lv three","triggerman lv three",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_commoners,
   [itm_bt_hunter,itm_bt_black_armor,itm_bt_black_greaves,itm_bt_black_helmet,itm_arrows,itm_nomad_sabre,itm_scimitar,itm_winged_mace,itm_lance,itm_khergit_bow,itm_khergit_guard_helmet,itm_khergit_cavalry_helmet,itm_khergit_guard_boots,itm_khergit_guard_armor,itm_nomad_shield,itm_steppe_horse,itm_warhorse],
   def_npc_attrib|level(30),wp(300),knows_riding_8|knows_ironflesh_5|knows_horse_archery_6|knows_power_draw_6,asia_face1, asia_face2],

# BT 
	["bt_zhan_shi","BT zhan shi","BT zhan shi",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits,
   [itm_bt_sword_of_war,itm_bt_hunter,itm_bt_black_armor,itm_bt_black_greaves,itm_bt_black_helmet,itm_steppe_horse,itm_shield_kite_m,itm_arming_sword],
   def_npc_attrib|level(28),wp_one_handed(200)|wp_two_handed(200)|wp(20),knows_riding_8|knows_ironflesh_5|knows_horse_archery_6|knows_power_strike_8,asia_face1, asia_face2
  ],
   
  ["bt_gong_shou","BT gong shou","BT gong shou",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits,
   [itm_khergit_bow,itm_khergit_war_helmet,itm_khergit_armor,itm_khergit_guard_boots,itm_khergit_guard_armor,itm_khergit_arrows,itm_shield_kite_m,itm_arming_sword],
   def_npc_attrib|level(28),wp_archery(200)|wp(20),knows_riding_8|knows_ironflesh_5|knows_horse_archery_6|knows_power_draw_8,asia_face1, asia_face2
  ],
  
  ["bt_nu_shou","BT nu shou","BT nu shou",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits,
   [itm_hunting_crossbow,itm_power_steel_bolts,itm_khergit_war_helmet,itm_khergit_armor,itm_khergit_guard_boots,itm_khergit_guard_armor,itm_shield_kite_m,itm_arming_sword],
   def_npc_attrib|level(28),wp_crossbow(200)|wp(20),knows_riding_8|knows_ironflesh_5|knows_horse_archery_6|knows_power_draw_6,asia_face1, asia_face2
  ],
  
  ["bt_qiang_shou","BT qiang shou","BT qiang shou",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits,
   [itm_new_power_flintlock_pistol,itm_new_power_cartridges,itm_bt_hunter,itm_bt_black_armor,itm_bt_black_greaves,itm_bt_black_helmet,itm_shield_kite_m,itm_dagger],
   def_npc_attrib|level(28),wp_firearm(200)|wp(20),knows_riding_8|knows_ironflesh_5|knows_horse_archery_6|knows_power_draw_6,asia_face1, asia_face2
  ],


# gui zi bing
  ["riben_langren","Tao Fan Lang Ren","Tao Fan Lang Ren",0,0,0,fac_outlaws,
   [itm_hatchet,itm_club,itm_butchering_knife,itm_falchion,itm_stones,itm_sjp_haraate_bandit,itm_sjp_haraate_hoso,itm_nomad_boots],
   def_attrib|level(5),wp(25),knows_common,asia_face1, asia_face2],
  ["riben_guizi","Gui Zi Bing","Gui Zi Bing",tf_guarantee_armor,0,0,fac_outlaws,
   [itm_arrows,itm_spiked_mace,itm_broadsword,itm_short_bow,itm_falchion,itm_nordic_shield,itm_sjp_haraate_hoso,itm_sjp_haraate_yama,itm_nomad_boots,itm_saddle_horse,itm_strange_short_sword],
   def_attrib|level(10),wp(50),knows_common|knows_power_draw_3,asia_face1, asia_face2],
  ["riben_gouride","Gou Ri Bing","Gou Ri Bing",tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_outlaws,
   [itm_arrows,itm_broadsword,itm_falchion,itm_long_bow,itm_sjp_light_haraate_bandit,itm_sjp_haraate_yama,itm_sjp_haraate_hoso,itm_nomad_boots,itm_saddle_horse,itm_strange_sword],
   def_attrib|level(15),wp(75),knows_common|knows_power_draw_4,asia_face1, asia_face2],
  ["riben_zhutou","Zhu Tou Bing","Zhu Tou Bing",tf_guarantee_armor,0,0,fac_outlaws,
   [itm_arrows,itm_broadsword,itm_winged_mace,itm_short_bow,itm_javelin,itm_sjp_light_haraate_hoso,itm_strange_armor,itm_hide_boots,itm_wooden_shield,itm_saddle_horse,itm_strange_great_sword],
   def_attrib|level(20),wp(100),knows_common|knows_power_draw_5,asia_face1, asia_face2],
  ["riben_zhutourenzhe","Zhu Tou Ren Zhe","Zhu Tou Ren Zhe",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_outlaws,
   [itm_arrows,itm_nordic_sword,itm_fighting_axe,itm_battle_axe,itm_spiked_mace,itm_nordic_shield,itm_long_bow,itm_strange_armor,itm_strange_boots,itm_strange_helmet,itm_strange_sword,itm_strange_great_sword,itm_strange_short_sword],
   def_attrib|level(25),wp(125),knows_ironflesh_6|knows_power_strike_6|knows_power_draw_5|knows_power_throw_2|knows_riding_1|knows_athletics_2,asia_face1, asia_face2],

#SA: paladin holy/dark
	["paladin","Paladin","Paladin",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_commoners,
   [itm_great_sword_frost_paladin,itm_bt_hunter,itm_bt_black_armor,itm_bt_black_greaves,itm_bt_black_helmet,itm_steppe_horse,itm_shield_kite_m,itm_arming_sword],
   def_npc_attrib|level(30),wp_one_handed(240)|wp_two_handed(220)|wp_polearm(200)|wp(100),knows_riding_8|knows_ironflesh_5|knows_horse_archery_6|knows_power_strike_8,asia_face1, asia_face2
  ],
  
  ["holy_paladin","Holy Paladin","Holy Paladin",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_commoners,
   [itm_great_sword_frost_paladin,itm_bt_hunter,itm_bt_black_armor,itm_bt_black_greaves,itm_bt_black_helmet,itm_steppe_horse,itm_shield_kite_m,itm_arming_sword],
   def_npc_attrib|level(36),wp_one_handed(320)|wp_two_handed(280)|wp_polearm(240)|wp(100),knows_riding_8|knows_ironflesh_8|knows_horse_archery_6|knows_power_strike_10,asia_face1, asia_face2
  ],
  
  ["dark_paladin","Dark Paladin","Dark Paladin",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_commoners,
   [itm_great_sword_frost_paladin,itm_bt_hunter,itm_bt_black_armor,itm_bt_black_greaves,itm_bt_black_helmet,itm_steppe_horse,itm_shield_kite_m,itm_arming_sword],
   def_npc_attrib|level(36),wp_one_handed(320)|wp_two_handed(280)|wp_polearm(240)|wp(150),knows_riding_8|knows_ironflesh_8|knows_horse_archery_6|knows_power_strike_10,asia_face1, asia_face2
  ],

#SA NPC  
 
	["claire","Claire","Claire",tf_female|tf_hero|tf_unkillable, 0, reserved, fac_commoners,
    [
	    itm_bt_hunter,itm_woolen_dress,itm_military_hammer,
   		itm_bt_black_armor,itm_bt_black_greaves,itm_bt_black_helmet,
  		itm_sunglasses,itm_sbtai_fem_plate_bikini,itm_sbtai_fem_ceremboot,
  		itm_flintlock_musket_hocus,
  		itm_bt_hunter,
  		itm_lengyueju,itm_tangdao,
  		itm_shield_kite_m,itm_dagger
    ],
    def_hero_attrib|level(18),wp(240),knows_hero|knows_wound_treatment_2|knows_trade_2|knows_horse_archery_6|knows_shield_4,0x000000000000000201c152351bab4558],

# party leader  (small boss)
	["paladin_leader","paladin_leader","paladin_leader",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_commoners,
   [itm_great_sword_frost_paladin,itm_bt_hunter,itm_bt_black_armor,itm_bt_black_greaves,itm_bt_black_helmet,itm_steppe_horse,itm_shield_kite_m,itm_arming_sword],
   def_npc_attrib|level(48),wp(460),knows_riding_10|knows_ironflesh_9|knows_horse_archery_9|knows_power_strike_10,asia_face1, asia_face2
  ],
  
  ["hired_blade_leader","hired_blade_leader","hired_blade_leader",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet,no_scene,reserved,fac_swadians,
   [itm_lance,itm_bastard_sword,itm_great_sword,itm_sword,itm_kite_shield_,itm_war_shield,itm_kite_shield,itm_kite_shield,itm_heraldric_shield,itm_heater_shield,itm_coat_of_plates,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_great_helmet,itm_bascinet,itm_hunter,itm_hunter,itm_charger,itm_warhorse, itm_leather_gloves],
   def_attrib|level(37),wp(370),knows_common|knows_riding_7|knows_shield_8|knows_ironflesh_7,swadian_face1, swadian_face2],

	["swadian_sharpshooter_leader","swadian_sharpshooter_leader","swadian_sharpshooter_leader",tf_guarantee_ranged|tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_swadians,
   [itm_bolts,itm_arrows,itm_crossbow,itm_crossbow,itm_heavy_crossbow,itm_long_bow,itm_arming_sword,itm_voulge,itm_heater_shield,itm_heater_shield,itm_leather_jerkin,itm_padded_leather,itm_hide_boots,itm_padded_coif,itm_nasal_helmet,itm_kettle_hat,itm_kettle_hat,itm_leather_gloves],
   def_attrib|str_14|level(36),wp(360),knows_common|knows_power_draw_6|knows_ironflesh_5,swadian_face1, swadian_face2],
  ["swadian_sergeant_leader","swadian_sergeant_leader","swadian_sergeant_leader",tf_mounted|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_swadians,
   [itm_awlpike,itm_pike,itm_great_sword,itm_morningstar,itm_sword,itm_kite_shield_,itm_war_shield,itm_kite_shield,itm_kite_shield,itm_heraldric_shield,itm_heater_shield,itm_coat_of_plates,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_helmet_with_neckguard,itm_bascinet,itm_guard_helmet,itm_leather_gloves],
   def_attrib|level(37),wp(370),knows_common|knows_shield_6|knows_ironflesh_6|knows_power_strike_6,swadian_face1, swadian_face2],
	["swadian_knight_leader","swadian_knight_leader","swadian_knight_leader",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_swadians,
   [itm_great_lance,itm_great_lance,itm_great_sword,itm_morningstar,itm_sword,itm_kite_shield,itm_war_shield,itm_kite_shield,itm_kite_shield,itm_heraldric_shield,itm_heater_shield,itm_coat_of_plates,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_guard_helmet,itm_great_helmet,itm_bascinet,itm_hunter,itm_charger,itm_charger,itm_warhorse,itm_leather_gloves],
   def_attrib|level(37),wp(370),knows_common|knows_riding_7|knows_shield_6|knows_ironflesh_7,swadian_face1, swadian_face2],

  ["vaegir_marksman_leader","vaegir_marksman_leader","vaegir_marksman_leader",tf_guarantee_ranged|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet,0,0,fac_vaegirs,
   [itm_arrows,itm_battle_axe,itm_falchion,itm_scimitar,itm_strong_bow,itm_strong_bow,itm_nomad_bow,itm_nomad_bow,itm_nomad_bow,itm_nomad_bow,itm_mail_hauberk,itm_padded_leather,itm_scale_armor,itm_nomad_boots,itm_spiked_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_nomad_cap],
   def_attrib|str_14|level(36),wp(360),knows_ironflesh_3|knows_power_draw_6|knows_athletics_5,vaegir_face1, vaegir_face2],
  ["vaegir_guard_leader","vaegir_guard_leader","vaegir_guard_leader",tf_mounted|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_vaegirs,
   [itm_ashwood_pike,itm_battle_fork,itm_bardiche,itm_battle_axe,itm_fighting_axe,itm_kite_shield_,itm_war_shield,itm_kite_shield,itm_heater_shield,itm_mail_hauberk,itm_lamellar_cuirass,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_leather_gloves],
   def_attrib|level(37),wp(370),knows_athletics_6|knows_shield_7|knows_ironflesh_8,vaegir_face1, vaegir_face2],
  ["vaegir_knight_leader","vaegir_knight_leader","vaegir_knight_leader",tf_mounted|tf_guarantee_boots|tf_guarantee_gloves|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_vaegirs,
   [itm_lance,itm_lance,itm_bardiche,itm_war_axe,itm_fighting_axe,itm_kite_shield_,itm_war_shield,itm_kite_shield_,itm_heater_shield,itm_mail_hauberk,itm_lamellar_cuirass,itm_mail_chausses,itm_iron_greaves,itm_nordic_helmet,itm_nordic_helmet,itm_nordic_helmet,itm_spiked_helmet,itm_warhorse,itm_warhorse,itm_warhorse,itm_leather_gloves],
   def_attrib|level(37),wp(370),knows_riding_7|knows_shield_6|knows_ironflesh_6,vaegir_face1, vaegir_face2],

	["triggerman_leader","triggerman_leader","triggerman_leader",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_commoners,
   [itm_bt_black_armor_green,itm_bt_hunter,itm_bt_black_armor,itm_bt_black_greaves,itm_bt_black_helmet,itm_arrows,itm_nomad_sabre,itm_scimitar,itm_winged_mace,itm_lance,itm_khergit_bow,itm_khergit_guard_helmet,itm_khergit_cavalry_helmet,itm_khergit_guard_boots,itm_khergit_guard_armor,itm_nomad_shield,itm_steppe_horse,itm_warhorse],
   def_npc_attrib|level(42),wp(410),knows_riding_8|knows_ironflesh_8|knows_horse_archery_8|knows_power_draw_8,asia_face1, asia_face2],

  ["sea_raider_leader","sea_raider_leader","sea_raider_leader",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_outlaws,
   [itm_arrows,itm_nordic_sword,itm_nordic_sword,itm_fighting_axe,itm_battle_axe,itm_spiked_mace,itm_nordic_shield,itm_nordic_shield,itm_nordic_shield,itm_round_shield,itm_long_bow,itm_javelin,itm_throwing_axes,itm_nordic_helmet,itm_nordic_helmet,itm_nasal_helmet,itm_mail_hauberk,itm_mail_hauberk,itm_mail_hauberk,itm_leather_jerkin,itm_leather_boots],
   def_attrib|level(28),wp(290),knows_ironflesh_5|knows_power_strike_4|knows_power_draw_5|knows_power_throw_2|knows_riding_1|knows_athletics_3,vaegir_face1, vaegir_face2],

  ["slaver_chief_leader","slaver_chief_leader","slaver_chief_leader",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_slavers,
   [itm_maul,itm_winged_mace,itm_mail_hauberk,itm_steel_shield,itm_nomad_boots,itm_leather_boots,itm_hunter],
   def_attrib|level(38),wp(370),knows_common|knows_riding_6|knows_power_strike_5,bandit_face1, bandit_face2],

  ["riben_zhutourenzhe_leader","riben_zhutourenzhe_leader","riben_zhutourenzhe_leader",tf_guarantee_boots|tf_guarantee_armor,0,0,fac_outlaws,
   [itm_arrows,itm_nordic_sword,itm_fighting_axe,itm_battle_axe,itm_spiked_mace,itm_nordic_shield,itm_long_bow,itm_strange_armor,itm_strange_boots,itm_strange_helmet,itm_strange_sword,itm_strange_great_sword,itm_strange_short_sword],
   def_attrib|level(45),wp(425),knows_ironflesh_8|knows_power_strike_8|knows_power_draw_8|knows_power_throw_8|knows_riding_8|knows_athletics_8,asia_face1, asia_face2],

  ["khergit_cavalry_leader","khergit_cavalry_leader","khergit_cavalry_leader",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_khergits,
   [itm_arrows,itm_scimitar,itm_scimitar,itm_winged_mace,itm_spear,itm_lance,itm_khergit_bow, itm_strong_bow,itm_short_bow,itm_steppe_cap,itm_nomad_cap,itm_spiked_helmet,itm_spiked_helmet,itm_mail_hauberk,itm_hide_boots,itm_nomad_shield,itm_round_shield,itm_steppe_horse],
   def_attrib|level(34),wp(330),knows_riding_5|knows_power_draw_6|knows_ironflesh_5,khergit_face1, khergit_face2],

  ["sword_sister_leader","sword_sister_leader","sword_sister_leader",tf_female|tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_horse,0,0,fac_commoners,
   [itm_bolts,itm_bastard_sword,itm_scimitar,itm_nordic_shield,itm_kite_shield,itm_crossbow,itm_nordic_shield,itm_plate_armor,itm_mail_chausses,itm_iron_greaves,itm_steel_helm_gold,itm_helmet_with_neckguard,itm_courser,itm_steel_greaves_gold,itm_steel_armor_gold],
   def_attrib|level(36),wp(360),knows_common|knows_riding_7|knows_athletics_5|knows_ironflesh_5|knows_shield_5,refugee_face1,refugee_face2],

  ["dark_knight_leader","dark_knight_leader","dark_knight_leader",tf_mounted|tf_guarantee_boots|tf_guarantee_armor|tf_guarantee_gloves|tf_guarantee_helmet|tf_guarantee_horse,0,0,fac_dark_knights,
   [itm_spear,itm_great_sword,itm_sword_of_war,itm_morningstar,itm_great_axe,itm_steel_shield,itm_war_shield,itm_steel_shield,itm_bt_black_armor_blue,itm_black_greaves,itm_bascinet,itm_guard_helmet,itm_saddle_horse,itm_warhorse,itm_leather_gloves],
   def_attrib|level(45),wp(446),knows_common|knows_riding_8|knows_shield_6|knows_ironflesh_7|knows_power_strike_5,swadian_face1, swadian_face2],

	["bt_headman","bt_headman","bt_headman",tf_mounted|tf_guarantee_ranged|tf_guarantee_shield|tf_guarantee_boots|tf_guarantee_helmet|tf_guarantee_armor|tf_guarantee_horse,0,0,fac_black_khergits,
   [itm_bt_sword_of_war,itm_bt_hunter,itm_bt_black_armor_gold,itm_bt_black_greaves_gold,itm_bt_black_helmet_gold,itm_steppe_horse,itm_shield_kite_m,itm_arming_sword,itm_bt_black_armor_red],
   def_npc_attrib|level(40),wp(400),knows_riding_8|knows_ironflesh_5|knows_horse_archery_6|knows_power_strike_8,asia_face1, asia_face2
  ],

#SA code end

]


#Note for upgraded troops: Index of upgraded troops should be less than 256, so declare the upgraded troops at the beginning of the declarations.

upgrade(troops,"farmer", "watchman")
upgrade(troops,"townsman","watchman")
upgrade(troops,"watchman","caravan_guard")

upgrade2(troops,"caravan_guard","mercenary","triggerman_one")
upgrade(troops,"triggerman_one","triggerman_two")
upgrade(troops,"triggerman_two","triggerman_three")

upgrade(troops,"riben_langren", "riben_guizi")
upgrade(troops,"riben_guizi", "riben_gouride")
upgrade(troops,"riben_gouride", "riben_zhutou")
upgrade(troops,"riben_zhutou", "riben_zhutourenzhe")

upgrade(troops,"vaegir_knight","paladin")
upgrade(troops,"swadian_knight","paladin")
upgrade(troops,"triggerman_three","paladin")
upgrade2(troops,"paladin","holy_paladin","dark_paladin")

upgrade(troops,"mercenary","hired_blade")
upgrade(troops,"swadian_peasant","swadian_militia")

upgrade2(troops,"swadian_militia","swadian_footman","swadian_skirmisher")
upgrade2(troops,"swadian_footman","swadian_man_at_arms","swadian_infantry")
upgrade(troops,"swadian_infantry","swadian_sergeant")
upgrade(troops,"swadian_skirmisher","swadian_crossbowman")

upgrade(troops,"swadian_crossbowman","swadian_sharpshooter")
upgrade(troops,"swadian_sharpshooter","bt_qiang_shou")
upgrade(troops,"swadian_man_at_arms","swadian_knight")

upgrade(troops,"vaegir_peasant","vaegir_footman")
upgrade2(troops,"vaegir_footman","vaegir_veteran","vaegir_skirmisher")

upgrade(troops,"vaegir_skirmisher","vaegir_archer")

upgrade(troops,"vaegir_archer","vaegir_marksman")
upgrade(troops,"vaegir_marksman","bt_qiang_shou")
upgrade2(troops,"vaegir_veteran","vaegir_horseman","vaegir_infantry")

upgrade(troops,"vaegir_infantry","vaegir_guard")
upgrade(troops,"vaegir_horseman","vaegir_knight")

upgrade(troops,"river_pirate","bandit")

upgrade(troops,"bandit","brigand")
upgrade(troops,"manhunter","slave_driver")

upgrade(troops,"slave_keeper","slave_driver")
upgrade(troops,"slave_driver","slave_hunter")
upgrade(troops,"slave_hunter","slave_crusher")
upgrade(troops,"slave_crusher","slaver_chief")


upgrade(troops,"follower_woman","hunter_woman")
upgrade(troops,"hunter_woman","fighter_woman")


upgrade(troops,"fighter_woman","sword_sister")
upgrade(troops,"pilgrim","follower_woman")
upgrade(troops,"refugee","follower_woman")
upgrade(troops,"peasant_woman","follower_woman")
upgrade(troops,"dark_hunter","dark_knight")
upgrade(troops,"black_khergit_horseman","black_khergit_guard")

upgrade(troops,"dark_hunter","dark_knight")
upgrade(troops,"dark_hunter","dark_knight")

